package innerclass;

public abstract class Event {
    private long evenTime;
    protected final long delaytime;

   public Event(long delaytime){
       this.delaytime=delaytime;
       start();
   }
   public void start(){
       evenTime=System.nanoTime()+delaytime;
   }
   public boolean ready(){
       return System.nanoTime()>=evenTime;
   }
   public abstract void action();
}
